home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIChromeRegistry.idl < prev    next >
Text File  |  2006-05-08  |  4KB  |  118 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is the Mozilla browser.
  17.  *
  18.  * The Initial Developer of the Original Code is
  19.  * Netscape Communications Corporation.
  20.  * Portions created by the Initial Developer are Copyright (C) 1999
  21.  * the Initial Developer. All Rights Reserved.
  22.  *
  23.  * Contributor(s):
  24.  *   pav
  25.  *   Blake Ross (blaker@netscape.com)
  26.  *   Benjamin Smedberg <bsmedberg@covad.net>
  27.  *
  28.  * Alternatively, the contents of this file may be used under the terms of
  29.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  30.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  31.  * in which case the provisions of the GPL or the LGPL are applicable instead
  32.  * of those above. If you wish to allow use of your version of this file only
  33.  * under the terms of either the GPL or the LGPL, and not to allow others to
  34.  * use your version of this file under the terms of the MPL, indicate your
  35.  * decision by deleting the provisions above and replace them with the notice
  36.  * and other provisions required by the GPL or the LGPL. If you do not delete
  37.  * the provisions above, a recipient may use your version of this file under
  38.  * the terms of any one of the MPL, the GPL or the LGPL.
  39.  *
  40.  * ***** END LICENSE BLOCK ***** */
  41.  
  42. #include "nsISupports.idl"
  43.  
  44. interface nsIURI;
  45.  
  46. [scriptable, uuid(68389281-f6d0-4533-841d-344a2018140c)]
  47. interface nsIChromeRegistry : nsISupports
  48. {
  49.   const PRInt32 NONE = 0;
  50.   const PRInt32 PARTIAL = 1;
  51.   const PRInt32 FULL = 2;
  52.  
  53.   /**
  54.    * Resolve a chrome URL to an loadable URI using the information in the
  55.    * registry. Does not modify aChromeURL.
  56.    *
  57.    * Chrome URLs are allowed to be specified in "shorthand", leaving the
  58.    * "file" portion off. In that case, the URL is expanded to:
  59.    *
  60.    *   chrome://package/provider/package.ext
  61.    *
  62.    * where "ext" is:
  63.    *
  64.    *   "xul" for a "content" package,
  65.    *   "css" for a "skin" package, and
  66.    *   "dtd" for a "locale" package.
  67.    *
  68.    * @param aChromeURL the URL that is to be converted.
  69.    */
  70.   nsIURI convertChromeURL(in nsIURI aChromeURL);
  71.  
  72.   /**
  73.    * refresh the chrome list at runtime, looking for new packages/etc
  74.    */
  75.   void checkForNewChrome();
  76. };
  77.  
  78. [scriptable, uuid(3e51f40b-b4b0-4e60-ac45-6c63477ebe41)]
  79. interface nsIXULChromeRegistry : nsIChromeRegistry
  80. {
  81.   /* Should be called when locales change to reload all chrome (including XUL). */
  82.   void reloadChrome();
  83.   
  84.   ACString getSelectedLocale(in ACString packageName);
  85.   
  86.   /* Should be called when skins change. Reloads only stylesheets. */
  87.   void refreshSkins();
  88.  
  89.   /**
  90.    * Installable skin XBL is not always granted the same privileges as other
  91.    * chrome. This asks the chrome registry whether scripts are allowed to be
  92.    * run for a particular chrome URI. Do not pass non-chrome URIs to this
  93.    * method.
  94.    */
  95.   boolean allowScriptsForPackage(in nsIURI url);
  96. };
  97.  
  98. %{ C++
  99.  
  100. #define NS_CHROMEREGISTRY_CONTRACTID \
  101.   "@mozilla.org/chrome/chrome-registry;1"
  102.  
  103. /**
  104.  * Chrome registry will notify various caches that all chrome files need
  105.  * flushing.
  106.  */
  107. #define NS_CHROME_FLUSH_TOPIC \
  108.   "chrome-flush-caches"
  109.  
  110. /**
  111.  * Chrome registry will notify various caches that skin files need flushing.
  112.  * If "chrome-flush-caches" is notified, this topic will *not* be notified.
  113.  */
  114. #define NS_CHROME_FLUSH_SKINS_TOPIC \
  115.   "chrome-flush-skin-caches"
  116.  
  117. %}
  118.